import {
  createRouter, createWebHashHistory,
  createWebHistory,
} from 'vue-router';

import Layout from '@/layout/index.vue';
import QiankunPage from '@/views/ContainerView/index.vue';
import LoginView from '@/views/LoginView/LoginView.vue';
import AppDetailView from "@/views/AdminViews/AppDetailView.vue";
import UserAppView from "@/views/AdminViews/UserAppView.vue";
const router = createRouter({
  history: createWebHashHistory('/'),
  routes: [
    {
      path: '/',
      name: 'login',
      component: LoginView
    },
    {
      path: '/authAppHome',
      name: 'authAppHome',
      component: Layout,
      children: [
        {
          path: 'appDetails',
          name: 'appDetails',
          component: AppDetailView
        }
      ]
    },
    {
      path: '/myAppList',
      name: 'myAppList',
      component: UserAppView
    },
    {
      path: '/microApp:pathMatch(.*)*',
      name: 'microApp',
      component: QiankunPage
    }
  ]
})

export default router
